<?php
namespace App\test;
class MyUser{
    private $mydb;
    public function __construct(MyDB $DB)
    {
        $this->mydb=$DB;
    }
    public function getAllUsers():array{//业务方法
        return $this->mydb->queryForRows("select * from users");
    }
}
